package com.yunhe.merchants.repository;

import com.yunhe.merchants.domain.DeptPlanData;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: DeptPlanDataRepository
 * @Description:
 * @author: GongDaCheng
 * @Date: 17:59 2021/5/10
 */
@Repository
public interface DeptPlanDataRepository {
    /**
     * @Description 新增部门计划
     * @Param deptPlanData
     * @Return int
     * @Date 2021/5/11 10:31
     */
    int insert(DeptPlanData deptPlanData);

    /**
     * @Description 根据年份查询所有部门的所有计划
     * @Param String year
     * @Return List<DeptPlan>
     * @Date 2021/5/11 17:58
     */
    List<DeptPlanData> getDeptPlans(@Param("orgIds") List<Long> orgIds,@Param("year") String year);
    
    /**
     * @Description 根据年、季、月查询对应的部门计划
     * @Param Long deptId, String type, String year, String quarter, String month
     * @Return DeptPlanData
     * @Date 2021/5/13 14:01
     */
    DeptPlanData getDeptPlan(@Param("orgIds")List<Long> deptIds,@Param("type") String type,@Param("year") String year,@Param("quarter") String quarter,@Param("month") String month);

    List<DeptPlanData> getParkPlan(@Param("orgIds")List<Long> deptIds,@Param("type") String type,@Param("year") String year,@Param("quarter") String quarter,@Param("month") String month);
}
